import java.util.Scanner;
public class Main{
    public static void main(String[] args) {
        String strall,str1,reg;
        Scanner scan = new Scanner(System.in);
        strall = scan.next();
        str1 = scan.next();
        //请在此添加代码
        //***********Begin************
        int sum=0;
        char[] ch=strall.toCharArray();
        char[] ch2=str1.toCharArray();
        for (int i = 0; i < ch.length; i++) {
            if(ch[i]=='号') {
                ch[i]=ch2[0];
                sum++;
            }
        }
        //strall=ch.toString();
        System.out.println(sum);
        System.out.println(ch);
        //***********End**************
    }
}
